import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);
const store = new Vuex.Store({
    state: {
      count: [],
      userId: 0,
    },
    mutations: {
      updateUser(state,n) {
        state.count = n;
      },
      getUserid(state,n){
        state.userId = n;
      }
    },
    actions: {
      updateUser(context) {
        context.commit('updateUser')
      }
    }
  });
  
  export default store;